//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.tool.picasso;

import android.graphics.Bitmap;
import android.graphics.Matrix;
import com.squareup.picasso.Transformation;

public class RotationTransformation implements Transformation {
    public RotationTransformation() {
    }

    public Bitmap transform(Bitmap source) {
        int width = source.getWidth();
        int height = source.getHeight();

        try {
            if(width != height && width > height) {
                Matrix m = new Matrix();
                m.setRotate(90.0F, (float)width, (float)height);
                Bitmap bm1 = Bitmap.createBitmap(source, 0, 0, width, height, m, true);
                source.recycle();
                return bm1;
            }
        } catch (OutOfMemoryError var6) {
            ;
        }

        return source;
    }

    public String key() {
        return "rotation()";
    }
}
